<template>
	<view class="main">
		<view class="background">
			<image src="../../../static/images/guang.png" mode=""></image>
		</view>
		<view class="back">
			<image src="../../../static/images/back.png" mode="aspectFit" @click="router"></image>
		</view>

		<view class="middles">
			<view class="middle">
				<view class="mid_img">
					<image src="../../../static/images/center.png" mode=""></image>
				</view>
				<image class="end_img" :src="shopdetalis.img" mode=""></image>
			</view>
			<view class="foot">
				<image src="../../../static/images/dipan.png" mode=""></image>
			</view>
			<view class="title">
				<image src="../../../static/images/left.png" mode=""></image>
				<text>{{shopdetalis.title}}</text>
				<image src="../../../static/images/right.png" mode=""></image>
			</view>

<!-- 			<view class="ps">
				<image src="../../../static/images/left_1.png" mode=""></image>
				<text>购买即可体验内容</text>
				<image src="../../../static/images/right_1.png" mode=""></image>
			</view> -->
			<view class="issued">
				<view class="company">
					<image :src="shopdetalis.issuer_img" mode=""></image>
					<view class="company_info">
						<view class="tit">发行方</view>
						<view>{{shopdetalis.issuer}}</view>
					</view>
				</view>
				<view class="address">
					<view>合约地址：</view>
					<view>{{shopdetalis.chain_address}} </view>
			
				</view>
				<view class="shopcode">
					<text class="shopcp">商品编号：</text>
					<text style="width: 500rpx; word-wrap: break-word;
    word-break: normal;">{{shopdetalis.goods_number}} </text>
				</view>
			</view>
			<view class="story">
				<text class="story_tit">作品故事</text>
				<view class="not_content">
					<!-- <text user-select> -->
					<!-- <rich-text :nodes="shopdetalis.buy_notes"></rich-text> -->
					<u-parse :html="shopdetalis.detail" :selectable="true"></u-parse>
					<!-- </text> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shopdetalis: {}
			}
		},
		onLoad() {
			this.getinfo()
		},
		methods: {
			router() {
				console.log(11);
				uni.navigateBack({
					delta: 1
				});
			},
			getinfo() {
				const that = this
				// #ifdef APP-NVUE
				const eventChannel = that.$scope.eventChannel; // 兼容APP-NVUE
				// #endif
				// #ifndef APP-NVUE
				const eventChannel = that.getOpenerEventChannel();
				// #endif
				eventChannel.on('details', function(data) {
					console.log(data.data)
					global.$http.request({
						url: '/api/mine/myGoodsDetail',
						data: {
							goods_id: data.data.id,
							token: uni.getStorageSync('token')
						}
					}).then(res => {
						if (res.data.code == 0) {
							console.log(res.data.data);
							that.shopdetalis = res.data.data
							console.log(that.shopdetalis);
						}
					})
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		width: 750rpx;
		// height: 100%;
		font-family: PingFang SC;
		background-color: #000000;
		font-family: PingFang SC-Regular, PingFang SC;

		.main {
			width: 750rpx;

			.background {
				image {
					width: 750rpx;
					height: 270rpx;
					position: absolute;
					top: 0;
					z-index: -5;
				}
			}

			.back {

				image {
					width: 48rpx;
					height: 48rpx;
					line-height: 4rpx;
					;
					position: fixed;
					top: 94rpx;
					left: 32rpx;
				}

			}

			.middles {
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-bottom: 140rpx;

				.middle {
					margin-top: 189rpx;
					position: relative;

					.mid_img {
						width: 400rpx;

						image {
							position: absolute;
							top: 0;
							width: 400rpx;
							height: 400rpx;
							z-index: 1;
						}
					}

					.end_img {
						width: 400rpx;

						height: 400rpx;
						z-index: 0;
					}
				}

				.foot {
					image {
						width: 750rpx;
						height: 200rpx;
					}
				}

				.title {
					display: flex !important;
					align-items: center !important;

					image {
						width: 90rpx;
						height: 44rpx;
					}

					text {
						padding: 35rpx 16rpx;
						font-size: 32rpx;
						font-weight: bold;
						color: #FFFFFF;
					}
				}

				.count {
					padding: 26rpx 0rpx 10rpx 0rpx;

					.coun_name {
						padding: 2rpx 8rpx;
						background: #F4BF57 !important;
						border-radius: 8rpx 0rpx 0rpx 8rpx;
						opacity: 1;
						font-size: 24rpx;
						font-weight: 400;
						color: #333333 !important;
					}

					.coun_num {
						padding: 2rpx 8rpx;
						font-size: 24rpx;
						font-weight: 400;
						color: #DBBE7E;
						background: #4C484B;
						border-radius: 0rpx 8rpx 8rpx 0rpx;
						opacity: 1;

					}
				}

				.ps {
					display: flex !important;
					align-items: center !important;

					image {
						width: 100rpx;
						height: 20rpx;
					}

					text {
						padding: 32rpx 12rpx;
						font-size: 24rpx;
						font-weight: 400;
						color: #999999;

					}
				}

				.issued {
					padding: 32rpx 24rpx;
					width: 686rpx;
					// height: 256rpx;
					background: #1B1B1B;
					border-radius: 32rpx 32rpx 32rpx 32rpx;
					opacity: 1;

					.company {
						display: flex;

						image {
							width: 70rpx;
							height: 70rpx;
						}

						.company_info {
							padding-left: 24rpx;
							font-size: 24rpx;
							font-weight: 400;
							color: #FFFFFF;

							.tit {
								padding-bottom: 4rpx;
								font-size: 24rpx;
								font-weight: 400;
								color: #FFFFFF;
								opacity: 0.5;
							}
						}
					}

					.address {
						padding: 32rpx 0 20rpx 0;
						view {
							font-size: 28rpx;
							font-weight: 400;
							color: #FFFFFF;
							line-height: 48rpx;
						}
					}

					.shopcode {
						display: flex;

						.shopcp {
							width: 150rpx;
							 white-space: nowrap;
						}

						text {
							font-size: 28rpx;
							font-weight: 400;
							color: #FFFFFF;
							line-height: 48rpx;
							
						}

					}
				}

				.story {
					margin: 24rpx 0;
					display: flex;
					flex-direction: column;
					align-items: center;
					padding: 32rpx 24rpx;
					width: 686rpx;
					// height: 804rpx;
					background: #1B1B1B;
					border-radius: 32rpx 32rpx 32rpx 32rpx;
					opacity: 1;

					.story_tit {
						font-size: 32rpx;
						font-weight: 400;
						color: #FFFFFF;
						line-height: 48px;

						image {
							width: 638rpx;
							height: 672rpx;
						}
					}
				}

				.notice {

					width: 686rpx;
					// height: 804rpx;
					background: #1B1B1B;
					border-radius: 32rpx 32rpx 32rpx 32rpx;
					opacity: 1;

					.not_tit {
						padding: 32rpx 0 24rpx 0;
						text-align: center;
						display: block;
						font-size: 32rpx;
						font-weight: 400;
						color: #FFFFFF;
						line-height: 48rpx;
					}

					.not_content {
						padding: 24rpx 34rpx;
						font-size: 24rpx;
						font-weight: 400;
						color: #999999;
						line-height: 48rpx;

					}
				}
			}

			.buy {
				position: fixed;
				bottom: 0;
				width: 750rpx;
				background: #151515;
				box-shadow: 0rpx -1rpx 0rpx 2rpx rgba(0, 0, 0, 0.07);
				border-radius: 0rpx 0rpx 0rpx 0rpx;
				opacity: 1;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 10rpx 32rpx;

				.money {
					font-size: 48rpx;
					font-weight: 400;
					color: #FFFFFF;

					text {
						padding-right: 4rpx;
						font-size: 32rpx;
						font-weight: 400;
						color: #FFFFFF;
					}

				}

				.button {
					padding: 10rpx 46rpx;
					background: #666666;
					border-radius: 42px 42px 42px 42px;
					opacity: 1;
					font-size: 28rpx;
					font-weight: 800;
					color: #FFFFFF;
					text-align: center;

					text {
						display: block;
						margin: 0;
						padding: 0;
					}

					.btn_tit {
						font-size: 24rpx;
						font-weight: 400;
						color: #FFFFFF;
					}
				}




			}

		}
	}
</style>
